LrmPackageReader.FileExists Method

Gets a value indicating whether a file exists in the LRM package.

Parent Type: LrmPackageReader

Namespace: Microsoft.LearningComponents

Assembly: Microsoft.LearningComponents.dll

Syntax
C#

public override bool FileExists (
string filePath

)

Parameters

filePath

The file to check. The path is relative to the root of the file hierarchy in the LRM package. This path should have no URL encoding.

Return Value

true if the file exists; otherwise false if the file does not exist, if the file is a directory, or if the filePath is null or String.Empty.

Exceptions
Exception type Condition
ArgumentException

filePath contains invalid characters.

InvalidOperationException

The LrmPackageReader is in an error state.

Permissions
Name Description
System.Security.Permissions.FileIOPermission

for reading files. Associated enumeration: System.Security.Permissions.FileIOPermissionAccess.Read.

Remarks

filePath is a relative path to the root of the LRM package.

The LRM package will be exploded into a temporary directory when this method is called, if not done previously.